package cate.game.role.res.guild.po.donate;

import cate.common.table.d.GDFunc;
import cate.game.role.res.guild.GuildFuncBase;
import cate.game.role.res.guild.msg.donate.GuildDonateResp;
import cate.game.role.res.guild.po.GuildPO;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import cate.game.role.Role;


@NoteClass(value = "联盟捐献数据")
public class  GuildDonatePO extends GuildFuncBase {

    @NoteField(value = "捐献记录")
    public GuildDonateLogPO log;

    @Override
    public void initialize(GuildPO guild) {
        super.initialize(guild);
        if (log == null) {
            log = new GuildDonateLogPO();
        }
        log.initialize(guild);
    }

    public void onDaySpan() {
        log.onDaySpan();
    }

    public void noticeUpdate(Role role) {
        role.sendNow(new GuildDonateResp(this));
    }

    @Override
    public int getFuncId() {
        return GDFunc.GuildFunc.DONATE;
    }
}
